//
//  YORequestBase.h
//  Youhuiju
//
//  Created by 余尚飞 on 2016/10/3.
//  Copyright © 2016年 yutenys. All rights reserved.
//

#import <Foundation/Foundation.h>
//请求方式
typedef NS_ENUM(NSUInteger,RequestMethod) {
    RequestMethodGET,
    RequestMethodPOST
};
//请求类型
typedef NS_ENUM(NSUInteger ,RequestType) {
    RequestTypeOrdinary,
    RequestTypeImage
};


@interface YORequestBase : NSObject

@property(nonatomic,copy)NSString *url;//请求地址
@property(nonatomic,strong)NSMutableDictionary *baseParams;//请求公共参数

+(NSURLSessionDataTask *)requestDataWithAPIName:(NSString *)apiName
                                       Params:(NSDictionary *)params
                                       success:(void(^)(NSURLSessionDataTask *task,id responeObject))success
                                       failure:(void(^)(NSURLSessionDataTask *task,NSError *error))failure;

@end
